

<include file="Public/head"/><body class="no-skin">
<include file="Public/header"/>
<div class="main-container" id="main-container">
    <script type="text/javascript">
        try {
            ace.settings.check('main-container', 'fixed')
        } catch (e) {
        }
    </script>

    <include file="Public/sidebar"/>
    <div class="main-content">
        <div class="main-content-inner">
            <!-- #section:basics/content.breadcrumbs -->
            <include file="Public/breadcrumbs"/>
            <!-- /section:basics/content.breadcrumbs -->
            <div class="page-content">
                <include file="Public/set"/>

                <!-- /section:settings.box -->
                <div class="row">
                    <div class="col-xs-12">
                        <!-- PAGE CONTENT BEGINS -->
                        <div class="cf">
                            <form class="form-inline" action="" method="get">
                                <select name="domain" class="form-control">
                                    <option value="0">--公众号--</option>
                                    <foreach name="platform_list" item="vo">
                                    <option value="{$vo.domain}" <if condition="$domian eq $vo[domain]">selected</if>>--{$vo.platform_name}--</option>
                                    </foreach>
                                </select>

                                <label class="inline">用户名称</label>
                                <input type="text" name="nickname" value="{$search_name}" class="form-control">


                                <button type="submit" class="btn btn-purple btn-sm">
                                    <span class="ace-icon fa fa-search icon-on-right bigger-110"></span> 搜索
                                </button><br/><br/>
                            </form>

                            <!-- <iframe frameborder="0" src="http://www.test.com/Home/File/index" allowtransparency="true" scrolling="yes" style="width: 100%; height:100%;">

                            </iframe> -->
                            <input type="button" class="btn btn-success btn-sm" id="add" value="增加一列"><br><br>
                            <div class= "inline">
                                <div class="btn inline btn-sm" style ="width:168px">标题</div>
                                <div class="btn inline btn-sm" style ="width:168px">描述</div>
                                <div class="btn inline btn-sm" style ="width:168px">文章地址</div>
                                <div class="btn inline btn-sm" style ="width:168px">图片地址</div>
								<!-- <div class="btn inline btn-sm" style ="width:168px">图片文件</div> -->
                                <!-- <div class="btn inline btn-sm" style ="width:150px">公众号</div> -->
                            </div><br><br>
                            <form class="form-inline" action="{:U('User/sendinfoall')}" method="post" target="_blank" enctype="multipart/form-data">
                                    <div id="boxs">
                                        <input type="hidden" name="user_ids" id="user_ids" value="" />
                                        <input type="hidden" name="domain"  value="qikaism.cn" />
                                        <input type="text" name="title[]" value="" class="form-control">
                                        <input type="text" name="description[]" value="" class="form-control">
                                        <input type="text" name="url[]" value="" class="form-control">
                                        <input type="text" name="picurl[]" value="" class="form-control">
                                        <!--<input type="file" name="img[]" value="上传图片" class="form-control">-->
                                        <!-- <input type="button" value="最全小说" class="form-control " disabled> -->
                                        <!--<span class="btn btn-danger btn-sm">图片必须小于64kb</span>-->
                                       <br/>
                                    </div><br/>
                                    <button type="submit" class="btn btn-purple btn-sm">
                                        <span class="ace-icon fa fa-search icon-on-right bigger-110"></span> 推送图文信息
                                    </button>
                            </form>
                        </div>
                        <div class="space-4"></div>
                        <form id="form" method="post" action="{:U('del')}">
                            <table class="table table-striped table-bordered">
                                <thead>
                                <tr>
                                    <th class="center"><input class="check-all" type="checkbox" value=""></th>
                                    <th>用户昵称</th>
                                    <th>open_id</th>
                                    <th>最后看书历史</th>
                                    <th>注册时间</th>
                                    <th>哪个公众号</th>
                                </tr>
                                </thead>
                                <tbody>
                                <volist name="list" id="val">
                                    <tr>
                                        <td class="center"><input class="aids" type="checkbox" name="user_id[]" value="{$val['user_id']}"></td>
                                        <td>{$val['nickname']}</td>
                                        <td>{$val['open_id']}</td>
                                        <td>{$val['history']}</td>
                                        <td>{$val['addtime']}</td>
                                        <td>{$val['platform_name']}</td>
                                    <tr>
                                </volist>
                                </tbody>
                            </table>
                        </form>
                        {$page}
                        <!-- PAGE CONTENT ENDS -->
                    </div><!-- /.col -->
                </div><!-- /.row -->
            </div><!-- /.page-content -->
        </div>
    </div><!-- /.main-content -->
    <include file="Public/footer"/>

</div><!-- /.main-container -->

<include file="Public/footerjs"/>
<!-- inline scripts related to this page -->
<script type="text/javascript">
    $(document).ready(function(){
      var spotMax = 7;
      if($('div.spot').size() >= spotMax) {$(obj).hide();}
      $("input#add").click(function(){
        addSpot(this, spotMax);
      });
    });
    function addSpot(obj, sm) {
        $('div#boxs').append(
            '<br><div class="spot">' +
            '<input type="text" name="title[]" value="" class="form-control"/> ' +
            '<input type="text" name="description[]" value="" class="form-control"/>  ' +
            '<input type="text" name="url[]" value="" class="form-control">  ' +
            '<input type="text" name="picurl[]" value="" class="form-control"> '+
            '</div>')
          .find("input.remove").click(function(){
            $(this).parent().remove();
            $('input#add').show();
          });

          if($('div.spot').size() >= sm) {$(obj).hide();}
        };

    $(function () {
        $(".check-all").click(function () {
            $(".aids").prop("checked", this.checked);
            getuserids();
        });
        $(".aids").click(function () {
            getuserids();
        });

        function getuserids(){
            var option = $(".ids");
            var user_ids = "";
            $(".aids").each(function(){
                if(this.checked){
                    user_ids += this.value+",";
                }
            });
            if(user_ids.length > 0)
                user_ids = user_ids.substring(0, user_ids.length - 1);
            $("#user_ids").val(user_ids);
            $("#user_ids1").val(user_ids);
        }
    })
</script>
</body>

</html>
